package com.gta.edu.sdk.common.interceptor;

import net.sf.json.JsonConfig;
import net.sf.json.processors.JsonValueProcessor;

public class TimestampProcessor implements JsonValueProcessor {
	private String format = "yyyy-MM-dd hh:mm:ss";

	public TimestampProcessor() {
		super();
	}

	public TimestampProcessor(String format) {
		this.format = format;
	}

	public Object processArrayValue(Object arg0, JsonConfig arg1) {
		return arg0;
	}

	public Object processObjectValue(String str, Object obj, JsonConfig arg2) {
		// TODO Auto-generated method stub
		String ret = "";
//		if (obj instanceof oracle.sql.TIMESTAMP) {
//			SimpleDateFormat sdf = new SimpleDateFormat(format);
//			try {
//				ret = sdf.format(((oracle.sql.TIMESTAMP) obj).dateValue().getTime());
//			} catch (SQLException e) {
////				e.printStackTrace();
//			}
//		}
//		return ret;
		return "";
	}
}
